import request from '@/utils/request'
const debug = process.env.NODE_ENV !== 'production'

export function login(data) {
    return request({
        url: debug ? './test/user/login' : './user/login',
        method: 'post',
        data
    })
}

export function getInfo(token) {
    return request({
        url: '/vue-element-admin/user/info',
        method: 'get',
        params: { token }
    })
}

export function logout() {
    return request({
        url: debug ? './test/user/logout' : './user/logout',
        method: 'post'
    })
}
